{extend name="default/template/base_index" /}

{block name="area_header"}
	<link rel="stylesheet" type="text/css" media="all" href="__CDN__/jquery-datetimepicker/jquery.datetimepicker.css">
	<script type="text/javascript" src="__CDN__/jquery-datetimepicker/jquery.datetimepicker.js"></script>
{/block}

{block name="area_body"}
	{include file="default/Widget/topbar" /}
	<div class="admin-main container-fluid">
		{include file="default/Widget/left" /}
		<div class="admin-main-content">
			{include file="default/Widget/breadcrumb" /}

			<!-- 带验证 form -->
			<form class="form-horizontal well validateForm">
				<input type="hidden" name="id" value="{$vo.id}" />
				<fieldset>
					<legend>
						投票添加
					</legend>
					<div class="form-group">
						<label for="inputtitle" class="col-md-2 col-lg-2 control-label">投票名称</label>
						<div class="col-md-10 col-lg-10">
							<input type="text" class="required form-control input-short" value="{$vo.vote_name}" name="vote_name" id="inputtitle" placeholder="请不要超过35个字">
							<div class="help-block">(不要超过35个字)</div>
						</div>
					</div>
					<div class="form-group">
						<label for="inputtitle" class="col-md-2 col-lg-2 control-label">活动时间段</label>
						<div class="col-md-10 col-lg-10">
							<input type="text" id="startdatetime" class="required form-control input-short" name="startdatetime" value="{:date('Y/m/d H:i',$vo['starttime'])}" >
							至
							<input type="text" id="enddatetime" class="required form-control input-short" name="enddatetime" value="{:date('Y/m/d H:i',$vo['endtime'])}" >
						</div>
					</div>
					<div class="form-group">
						<label for="inputtitle" class="col-md-2 col-lg-2 control-label">序号</label>
						<div class="col-md-10 col-lg-10">
							<input type="text" class=" form-control input-short" name="sort" value="{$vo.sort}" id="inputtitle" placeholder="请不要超过35个字">
							<div class="help-block">(从小到大)</div>
						</div>
					</div>
					<div class="form-group">
						<label for="inputtitle" class="col-md-2 col-lg-2 control-label">分组</label>
						<div class="col-md-10 col-lg-10">
							<input type="text" class="required form-control input-short" value="{$vo.group}" name="group" id="inputtitle" placeholder="请不要超过35个字">
							<div class="help-block">(请给唯一标识，最好加时间比如: 20150501_huodong,注意不要用中文！)</div>
						</div>
					</div>
					
					<div class="form-group">
						<label for="btns" class="col-md-2 col-lg-2 control-label">&nbsp;</label>
						<div class="col-lg-10 col-md-10">
							<a target-form="validateForm" class="ajax-post btn btn-primary" href="{:url('Vote/edit')}" autofocus="autofocus"><i class="fa fa-save"></i> {:L('BTN_SAVE')}</a>
							<a class="btn btn-default" href="{:url('Vote/index')}"><i class="fa fa-reply"></i>返回</a>
						</div>
					</div>
				</fieldset>
			</form>
			<!-- form -->

		</div>
		<!-- END admin-main-content -->
	</div>
	<!-- END admin-main-->
{/block}

{block name="area_footer"}

	<script>
		
		$(function() {
			$('#enddatetime').datetimepicker({
				lang: 'ch'
			});
			
			$('#startdatetime').datetimepicker({
				lang: 'ch'
			});
		});

	</script>
{/block}